package ru.rchervot.sanasar.client.rpc;

import ru.rchervot.sanasar.client.model.ResultsPage;
import ru.rchervot.sanasar.client.model.SearchResultsItem;

import com.google.gwt.user.client.rpc.AsyncCallback;

public abstract class GotPage<T extends SearchResultsItem> 
implements AsyncCallback<GetPageResponse<T>> {
	public void onFailure(Throwable oops) {
	}
	
	public void onSuccess(GetPageResponse<T> result) {
		got(result.getPage());
	}
	
	public abstract void got(ResultsPage<T> resultsPage);
}
